Skip to content

feat(skills): add Copilot/Claude agent definitions and skill scripts for automated PR & issue workflows#45883

Draft
yeelam-gordon wants to merge 1 commit intomainfrom
user/yeelam/TriagePullRequests
Draft

feat(skills): add Copilot/Claude agent definitions and skill scripts for automated PR & issue workflows#45883
yeelam-gordon wants to merge 1 commit intomainfrom
user/yeelam/TriagePullRequests

Conversation

@yeelam-gordon
Copy link
Contributor

Summary of the Pull Request

Adds 10 new GitHub Copilot/Claude skill definitions and 8 agent definitions that enable automated end-to-end PR and issue workflows from the CLI. This includes PR review, PR triage, PR fix, PR rework, issue review, issue fix, issue-to-PR lifecycle, review-the-review feedback loops, continuous issue triage, and a shared parallel-job orchestrator.

All scripts support both GitHub Copilot CLI and Claude Code CLI, with dynamic $_cfgDir resolution for dual .github/ and .claude/ root awareness. Worktree-based workflows copy the full config directory (agents, skills, instructions, prompts, top-level instruction files) into worktrees so the CLI can resolve --agent definitions and MCP config in isolated branches.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already.
  • Tests: N/A — these are developer-facing automation scripts and agent definitions, not product code. Scripts were validated via PowerShell Parser::ParseFile and dry-run invocations.
  • Localization: N/A — no end-user-facing strings; all output is developer-console diagnostics.
  • Dev docs: N/A — each skill includes its own SKILL.md with usage documentation.
  • New binaries: N/A — no new binaries, installers, or pipelines affected.
  • Documentation updated: N/A — no product documentation changes.

Detailed Description of the Pull Request / Additional comments

Agent definitions (.github/agents/)

8 goal-oriented agent files for both Copilot and Claude CLIs:

Agent Purpose
ReviewPR Multi-dimensional PR code review (functionality, security, perf, a11y, etc.)
FixPR Fix unresolved review comments on a PR
TriagePR Categorize and label incoming PRs
ReviewIssue Analyze GitHub issues for clarity, feasibility, and implementation effort
PlanIssue Generate implementation plans from reviewed issues
FixIssue Execute an implementation plan to fix an issue
IssueToPR Orchestrate the full review → plan → fix → PR lifecycle
ReviewTheReview Meta-review: evaluate quality of AI-generated issue reviews

Skill scripts (.github/skills/)

Skill folder Files Description
pr-review 25 13-dimension PR review with parallel job orchestration and GitHub comment posting
pr-triage 17 Collect open PRs, run AI enrichment, categorize, and generate triage reports
pr-fix 9 Fix unresolved PR review threads using AI CLI in worktrees
pr-rework 8 Iterative review→fix loop with build validation and worktree isolation
continuous-issue-triage 13 Batch issue collection, categorization, and summary generation
issue-review 6 Single/bulk issue analysis with confidence scoring
issue-review-review 8 Feedback loop to evaluate and improve AI review quality
issue-fix 11 Create worktrees, apply AI fixes, commit, and create PRs
issue-to-pr-cycle 5 End-to-end orchestrator: review → plan → fix → PR → review loop
parallel-job-orchestrator 5 Shared library for running parallel CLI jobs with timeout, retry, and log monitoring

Other files

  • .github/review-tools/Start-PrReviewBatch.ps1 — batch runner for PR review across multiple PRs

Key design decisions

  • Dual-root support: All scripts derive $_cfgDir dynamically from $PSScriptRoot to support both .github/ (Copilot) and .claude/ (Claude) directory structures.
  • Worktree config copy: Scripts that create worktrees (Start-PRRework.ps1, Start-IssueAutoFix.ps1) and scripts that operate in worktrees (Start-PRFix.ps1) copy agents/, skills/, instructions/, prompts/, and top-level instruction files using "copy if not exist" semantics.
  • --agent flag: Every CLI invocation specifies --agent <AgentName> to ensure the correct agent definition is loaded.

Validation Steps Performed

  • All 116 changed files are new additions (24,306 insertions, 6 deletions in existing agent files).
  • PowerShell [Parser]::ParseFile confirms zero parse errors on all .ps1 scripts.
  • Dry-run validation of Start-PRRework.ps1 with -MaxIterations 1 -SkipTests -ReviewTimeoutMin 1.
  • grep verification confirms --agent flag present in all CLI invocation sites with correct agent names.
  • grep verification confirms zero remaining hardcoded .github/skills/ or .github/prompts/ paths in Join-Path calls.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check-spelling found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (42)
cheatsheets
cheatsheetseries
codeowners
committers
contrastchecker
cwe
docblocks
EAP
Feas
FIXMEs
hashtables
HHmm
jiripolasek
kaboom
KDFs
Liskov
lookback
maxed
mdl
myskill
noe
OCP
oneline
owasp
parseable
postconditions
prioritization
pushback
reimplementation
rpr
sev
taskrunner
timestamped
TOCTOU
triaged
TROk
TSHIRT
unregistration
userguide
warnaserror
webaim
winver
These words are not needed and should be removed MDL WINVER

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the user/yeelam/TriagePullRequests branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/22573170618/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns 🙅 (5)

In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves.

These forbidden patterns matched content:

Complete sentences in parentheticals should not have a space before the period.

\s\.\)(?!.*\}\})

Should be in-depth if used as an adjective (but in depth when used as an adverb)

\bin depth\s(?!rather\b)\w{6,}

Should be ; otherwise or . Otherwise

https://study.com/learn/lesson/otherwise-in-a-sentence.html

, [Oo]therwise\b

Should probably be Otherwise,

(?<=\. )Otherwise\s

In English, duplicated words are generally mistakes

There are a few exceptions (e.g. "that that").
If the highlighted doubled word pair is in:

  • code, write a pattern to mask it.
  • prose, have someone read the English before you dismiss this error.
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
Errors and Warnings ❌ (2)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors and Warnings Count
❌ forbidden-pattern 5
⚠️ ignored-expect-variant 3

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant